<?php

declare(strict_types=1);

namespace Modules\Inspection\Models;

use Catch\Base\CatchModel as Model;

/**
 * @property $id
 * @property $creator_id
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
*/
class Inspectioncheck extends Model
{
   

    protected $table = 'inspectioncheck';

    protected $fillable = [ 'id','creator_id','created_at','updated_at','deleted_at','testitem','testmethod','teststandard','remarks','inspection_id'];

    /**
     * @var array
     */
    protected array $fields = ['id','created_at','updated_at','testitem','testmethod','teststandard','remarks','inspection_id'];

    /**
     * @var array
     */
    protected array $form = ['id','created_at','updated_at','testitem','testmethod','teststandard', 'remarks','inspection_id'];

    /**
     * @var array
     */
    public array $searchable = [
        'testmethod' => 'like',
        'teststandard' => 'like',
        'remarks' => 'like',
    ];

     //输出相应的时间格式
     protected function serializeDate($date)
     {
        // return $date->format('Y-m-d H:i');
     return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
     }

    
}
